intro.txt 8/11/95 Newt 3.1 (c) 1993, 1994, 1995, S. Weyer, All Rights Reserved Worldwide. weyer@netaxs.com - Introduction - Newt in the News - For Further Info - Programming WARNING -- Newt and You - NewtonScript - Personal History, Credits Read Newt.1st first. Copyright S. Weyer 1993, 1994, 1995, All Rights Reserved Worldwide. Newt is shareware. It may be freely distributed via online services and bulletin boards if it is unmodified and includes the files described in Newt.1st. It may not be commercially bundled or redistributed on CD-ROM, floppy disk, PCMCIA, networks or other media without my permission. Please continue reading for help, examples, warnings and other information. ===== Introduction Newt allows you to developing applications using NewtonScript, run and test it, and save it as a packagte directly on your Newton. NewtonScript (NS), Newton's built-in, object-oriented (o-o) language, shares ancestry with dynamic o-o languages like Smalltalk, Self, Common Lisp, and ObjectLogo. NewtonScript is the same language that is used by Apple's Newton ToolKit (NTK). For more advanced users, familiarity with o-o concepts and constructs would be useful; for others, Newt should serve as a brief introduction to these ideas. There is some information on NewtonScript here, and more in the Newt manual (available to registered users). Newt 1.0, the first version of Newt, was a turtle-graphics environment (this is available now via an optional NewtDraw plug-in -- see turtle.txt). Newt 2.0 introduced rudimentary capabilities to create dynamic views and stand-alone applications that could later be run or transferred using RUNewt [no longer needed]. Users interested in building applications could consider Newt a portable prototyper, or as a learning step toward building more complex, complete and industrial-strength applications via NTK on Macintosh (and eventually Windows). See examples.txt for a list applications that can be built in Newt (and that are available to registered users). See Getting Started in using.txt. Newt 3.0 provides the ability to create real packages directly on the Newton (this requires the NewtPack plug-in -- see packages.txt). ===== Newt in the News Newt 1.0 received an early positive review in the first issue of the (now defunct) DoubleTap newsletter. "Building Native Newton Applications with Newt" appeared in PIE Developers, Vol. 2.4, July 1994; pp.14-18. Erica Sadun reviewed Newt's turtle personality in the same issue. _protoReality 1.3 -- the NANUG newsletter, available as a Newton book -- features an interview about Newt. _protoReality 1.3 & 1.4 have articles with my daughter on using Newt to draw letters. Serg Koren has posted a Newt 2.4 review (in Paperback format) to newton.uiowa.edu/submissions, CIS, AOL and eWorld; it's available on the World Wide Web via: http://www.netaxs.com/~archimag/revw.html "Newt" is often used by the monosyllable-challenged to refer to a Newton. "Newt is neat" could refer to the Newton itself and/or to this wonderful application -- I will always mean the latter. Show Newt to your friends to help achieve the worldwide goal of "Newt on every Newt"! So that Newt can appeal to many families and orientations, it is gender "newtral" (in order to reproduce more Newts, however, it has not been "newtered"); users should probably not call themselves "newtists". In other literary references, there is of course Shakespeare's famous drink recipe: "eye of newt, ...". For crossword puzzle fans, "eft" is an old term for "newt". Newts have hatched aboard the space shuttle Ñ "one small step for a newt, a giant leap for newtkind". Tabloids will probably suggest a connection between Newt and Elvis. This is likely, given Elvis' early career as a "lounge lizard". However, the FBI has conspiratorially censored this from the latest Newton ROMs [in early Newtons, you could set the Country field of your Personal Preferences to Graceland, though this "Easter Egg" could later interfere with dialing. A picture of a newt reappeared briefly whenever you woke up your Newton. Other wakeup pictures can be obtained by adding two or three spaces after your Address]. You should discount any tabloid allegations suggesting any relation between Newt, football great Knute Rockne, Newt, Wayne Newton, Olivia Newton-John, Newton Minnow, or last, but not least, U.S. Speaker of the House Newt Gingrich. ===== For Further Info Since I provide little description of Newton syntax, other functions, or curriculum ideas in this introductory file, I strongly recommend that you stay reasonably close to the examples that I provide, register Newt to obtain a more detailed manual and sample sources, wait for NS books to be published (there is an introductory book by McKeehan&Rhodes for $30 with demo version of Mac NTK), and/or buy the NTK and docs from APDA for $300. Take a look at the NewATut and NewtTurT Newton books, which are interactive tutorials. PDA (formerly PIE) Developers magazine is a source of practical programming information and examples (cds@netcom.com). Join the NANUG user group -- fun and useful (marku@aix3.ema.com). >> See newt-faq.txt for Frequently Asked Questions about Newt, NTK, etc. >> See register.txt for Registration information/form >> See examples.txt for Current List of 165+ Examples >> See using.txt for information on installing and using Newt >> See changes.txt for revision history and possible future features >> See my home page for the latest info: http://www.netaxs.com/~weyer >> Contact weyer@netaxs.com if you have further questions ===== Programming WARNING -- Newt and You Exploring "mathematics microworlds" and doing problem solving by writing programs are "powerful ideas" (Seymour Papert) and require some active participation by you the learner -- taking risks and making mistakes. For example, Newt allows you to execute arbitrary NewtonScript expressions. This can be a formula for enlightenment or disaster. So, remember that this is your Newton with your information and listen to your mother's advice about backing up your system and hanging out with strange functions. Using common sense in following examples and suggestions, and limiting yourself to documented commands, you should reap many benefits and long hours of enjoyment from using Newt. At the same time, "a little learning [about programming] is a dangerous thing" (with apologies to Alexander Pope). I would caution against experimenting with random functions or methods. "Gee, I wonder what xxx does" might yield a simple error box, or it might zap a frame or soup in your system. At the same time, given the litigious nature of our society that yearns for risk without responsibility, I feel compelled to add the following warning (repeated in other variations several places later): >>> WARNING: USE THIS PACKAGE AT YOUR OWN RISK! <<< ===== NewtonScript Syntax If you have already tried the examples and expressions outlined in under Exploring Application or Turtle, looked at the examples applic0.nwt, applic2.nwt and graphic0.nwt, then you should have a rough idea of what NewtonScript (NS) syntax is like and several of Newt's commands. In NS, programs or scripts are defined as "methods" on objects. Methods describe an object's behavior or actions. Objects in NS are called "frames" (perhaps they should have been called "newtrons"), which inherit attributes and behavior from other frames, usually called "prototypes". Newt is a prototype or kind of view. You tell Newt to do things by sending it a "message", e.g., go. This message consists of a frame (Newt implicitly), a colon (:) separator, the method name, and parentheses with zero or more parameters (values for variables) separated by commas. For example, :go(50). A frame also has "slots" (named attributes) that contain values that you can access, such as times, dist, and deg. You can just use the slot name if it can be found via inheritance, or frame.slot if you want to be more specific. WARNING: IF YOU USE OTHER SYSTEM FRAMES, METHODS, AND FUNCTIONS BEYOND THE ONES I HAVE DESCRIBED HERE, IN MANUAL, AND IN EXAMPLE FILES, YOU DO SO AT YOUR OWN RISK. For further information on NewtonScript syntax and view frame slots and methods, NTK from APDA includes manuals, and other books will be published. The Newt Manual provides a summary of syntax and built-in functions, along with additional Newt methods for registered users. Errors In the unlikely event that an error occurs during Eval or Save, Newt pops up a helpful error message and/or cryptic code. You can add another plug-in (ErrCnst) that provides a complete list of error message. There is a Newton book (newton.uiowa.edu/newton/software/books/error-book.hqx) that lists errors from the NTK docs. If you have a Macintosh, the Newton LowDown DA (newton.uiowa.edu/newton/software/hqx/misc/lowdown-da.hqx) may be useful. Things to try: check your syntax against those in examples, check spelling for method and variable names, missing or extra punctuation or values, garbage from stray gestures, check number and type of arguments (e.g., float vs. integer), and in general use your "newtle". If you think it is really a problem with Newt, send me mail describing what you had entered, and I will try to respond asap. The 80+ page manual provides basic coverage of NewtonScript syntax and many built-in functions. It also documents methods for creating applications, customizing Newt, drawing with it, and accessing other system functionality. Description and examples of specific system prototypes are provided in separate files (see examples.txt). ===== Personal History I first implemented a screen turtle on an IMLAC display computer, accessed from BBN Logo on a DEC PDP-10 at Stanford circa 1973. Subsequently, I implemented other versions in Lisp, and used others in Smalltalk and ObjectLogo. My long-time interests in children, learning and programming environments, plus two small NTK examples, Dot2Dot and InspectorGadget, with a little creative juxtaposition, started me down this path. Experience with using and implementing object-oriented browsers and toolkits in Smalltalk and Lisp and numerous user requests led to the Newt 2.x enhancements to support application development. When I am not working on Newt at home or trying to have a life, I am consulting, currently for pharmaceutical companies, on "enabling technologies", in particular, pen-based systems. Credits Newt 3.1 was developed with NTK 1.5.1; some parts (plug-ins) of Newt were developed with New itself. Newton and Newton ToolKit are trademarks of Apple Computer. Kudos to Apple for creating an exciting product (Newton), and powerful object-oriented language (NewtonScript) and development environment (NTK). I look forward to new versions of NTK, documentation and examples. Manual created with FrameMaker 4.0 (from Frame Technology); electronic version with Acrobat 2.0 (from Adobe), and various Newtonbook versions using BookMaker. My family contributed the evening and weekend time for me to explore this; Ellie and Kristina helped with testing, Maria with proofreading. Finally, thanks to the users and testers who have given me feedback and encouragement. I hope that Newt can continue to evolve into an environment that meets your needs.